/*
-----------------------------------------------------------------------------
This source file is part of Labor3D
(Labor 3D Graphics Engine)

Copyright (c) 2009-2020 Rock Mao
* creator : Rock Mao
* created : 2009-6-27   22:29
* filename: LaborD3D10Helps.h
-----------------------------------------------------------------------------
*/

#ifndef __LABORD3D10HELPS_H__
#define __LABORD3D10HELPS_H__
#include "LaborD3D10Def.h"
#include "Renderer\LaborHardwareBuffer.h"
#include "LaborD3D10Headers.h"
NAMESPACE_LABOR3D_BEGIN

const int NBYTE_ALAIGN = 4;

class CLD3D10Helps
{
public:
	/// enum identifying D3D10 tex. types
	enum eLD3DTexType
	{
		/// standard texture
		D3D_TEX_TYPE_NORMAL,
		/// cube texture
		D3D_TEX_TYPE_CUBE,
		/// volume texture
		D3D_TEX_TYPE_VOLUME,
		/// just to have it...
		D3D_TEX_TYPE_NONE
	};

	/// enum identifying D3D10 filter usage type
	enum eLD3DFilterUsage
	{
		/// min filter
		D3D_FUSAGE_MIN,
		/// mag filter
		D3D_FUSAGE_MAG,
		/// mip filter
		D3D_FUSAGE_MIP
	};

public:
	static D3D10_USAGE _getUsage(EHB_Usage mUsage);
	static D3D10_USAGE _getUsage(int mUsage);
	static bool _isDynamic(EHB_Usage mUsage);
	static UINT _getAccessFlags(EHB_Usage mUsage);
	static UINT _getAccessFlags(int mUsage);

	static DXGI_FORMAT     _getIndexType(eLIndexType eIdxType );
	static UINT            _getBufferBindFlag(eLHardwareBufferType _type ); 


};

NAMESPACE_LABOR3D_END

#endif //__LABORD3D10HELPS_H__